package com.ss.sdg.interfacedependence;


public class IDEdge implements Comparable<IDEdge> {

	private int edgeID;

	private String name;

	private Node headNode;

	private Node tailNode;

	public IDEdge(int edgeID, String name, Node headNode, Node tailNode) {
		super();
		this.edgeID = edgeID;
		this.headNode = headNode;
		this.tailNode = tailNode;
		this.name = name;
	}

	public int getEdgeID() {
		return edgeID;
	}

	public void setEdgeID(int edgeID) {
		this.edgeID = edgeID;
	}

	public Node getHeadNode() {
		return headNode;
	}

	public void setHeadNode(Node headNode) {
		this.headNode = headNode;
	}

	public Node getTailNode() {
		return tailNode;
	}

	public void setTailNode(Node tailNode) {
		this.tailNode = tailNode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public int compareTo(IDEdge o) {
		if (edgeID == o.getEdgeID()) {
			return 0;
		} else if (edgeID > o.getEdgeID()) {
			return 1;
		} else {
			return -1;
		}
	}

}
